10.1 TCP Operation  
  10.1.2 Synchronization or 3-way handshake  
TCP is a connection-oriented protocol. Prior to data transmission, the two communicating hosts go through a synchronization process to establish a virtual connection. This synchronization process insures that both sides are ready for data transmission and allows the devices to determine the initial sequence numbers. This process is known as a three-way handshake. This is a three-step process that establishes the virtual connection between the two devices. 
  • First, one host initiates a connection by sending a synchronization (SYN) packet indicating its initial sequence number of x with a certain bit in the header set to indicate a connection request. This bit is set in the acknowledgment number field of the TCP header (also referred to as the code field). 
  • Second, the other host receives the packet, records the sequence number of x, replies with an acknowledgment of x + 1, and includes its own initial sequence number of y. The acknowledgment number of x + 1 means the host has received all octets up to and including x, and is expecting x + 1 next.
  • Finally, the initiating host responds with a simple acknowledgment (ACK) of y + 1 (host B’s sequence number + 1), indicating it received the previous ACK which finalizes the connection process.

It is important to understand that sequence numbers are a part of initiating communication between the two devices. They act as reference starting numbers between the two devices. The sequence numbers give each host a way to ACK the SYN so that the receiver knows the sender is responding to the proper connection request.

 

 Interactive Media Activity

Drag and Drop: TCP Synchronization

After completing this activity, the student will be able to understand TCP synchronization.

 
 

Web Links

3-Way Handshake

http://www.cs.panam.edu/~meng/ Course/CS6345/ Notes/chpt-6/node8.html